<!DOCTYPE html>
<html>
<head><meta HTTP-EQUIV=CONTENT-TYPE CONTENT="text/html; charset=utf-8"></head>
<body>
<pre>
				byte[] bytes = JasperRunManager.runReportToPdf(reportLocation+&quot;/order.jasper&quot;,parameters);
				res.setContentType(&quot;application/pdf&quot;); 
				res.setContentLength(bytes.length);
				ServletOutputStream ouputStream = res.getOutputStream();
				ouputStream.write(bytes, 0, bytes.length);
				ouputStream.flush();
				ouputStream.close(); 


				JasperRunManager.runReportToPdfStream(req.getSession().getServletContext().getResourceAsStream(reportLocation+&quot;/order.jasper&quot;), res.getOutputStream(),parameters);



				&lt;html&gt;
				&lt;head&gt;
				&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width; height=device-height;&quot;&gt;
				&lt;title&gt;spring-data-mongo-reference.pdf (application/pdf &#23545;&#35937;)&lt;/title&gt;
				&lt;/head&gt;
				&lt;body marginwidth=&quot;0&quot; marginheight=&quot;0&quot;&gt;
				&lt;embed width=&quot;100%&quot; height=&quot;100%&quot; name=&quot;plugin&quot; src=&quot;http://static.springsource.org/spring-data/data-mongodb/docs/current/reference/pdf/spring-data-mongo-reference.pdf&quot; type=&quot;application/pdf&quot;&gt;
				&lt;/body&gt;
				&lt;/html&gt;
</pre>
</body>
</html>
